'use strict';
import { observable, action, computed, runInAction } from 'mobx'
import BaseStore from './BaseStore'

// app状态和信息
class AppStore extends BaseStore {

    constructor(params) {
        super(params)
        this.networkState = null // 网络状态,none,wifi,cellular
        this.appState = null // 前后 后台
        this.deviceInfo = null  // 设备的所有信息

    }

    @observable appState
    @observable networkState
    @observable deviceInfo

    @action
    changeNetworkState = (state) => {
        this.networkState = state
    }

    @action
    changeAppState = (state) => {
        this.appState = state
    }

    @action
    setDeviceInfo = (info) => {
        this.deviceInfo = info
    }

}

export default AppStore
